Skip to content

security: resolve glob/minimatch OSV advisories - #208

Merged
K-Arthur merged 2 commits into
masterfrom
cursor/osv-glob-minimatch-921a
Oct 31, 2026
Merged

K-Arthur merged 2 commits into
masterfrom
cursor/osv-glob-minimatch-921a

Conversation

@K-Arthur

Copy link
Copy Markdown
Collaborator

Lane

  • Library
  • Testing
  • Docs
  • Plugin
  • Translation
  • App

What and why

OSV-Scanner has been failing on master since #191 (5:08 PM PT Oct 30). The lockfile scan reports seven Medium findings that did not exist earlier that afternoon:

  • GHSA-3g3m-2fjr-6pw4 — glob 10.5.0 and 13.0.6. AbortSignal cancellation does not stop the walker. Fixed in 14.0.2+.
  • GHSA-g3hv-75wg-m249 — minimatch 3.x / 5.x / 9.x / 10.x. Pattern amplification in firstPhasePreProcess when optimizationLevel >= 2. Fixed only in 11.0.1+.

No same-major patches exist. The compatible majors are now overridden; the two leftover lines that cannot take the CJS namespace change are ignored by package version, not by advisory id.

Overrides (patched versions in the lockfile)

  • glob@>=9 → 14.0.3. Consumers were @wdio/config and archiver-utils (10.x) and Storybook's react-docgen plugin (13.x). Both still expose sync / globSync. mocha's glob 8.1.0 is outside the advisory range (introduced in 9.0.0) and is left alone.
  • minimatch@>=9 → 11.0.3. Covers Stryker, typescript-eslint, and the glob 10 leftover. 9.x/10.x already use the dual CJS/ESM named-export API.

Published 2026-10-27/28, so they clear pnpm minimumReleaseAge. pnpm install did not hit ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION.

Ignores (why 3.x/5.x stay)

These are PackageOverrides on exact leftover versions, expiry 2026-12-30 (~60 days). The advisory id is not ignored, so a later 9.x/10.x regression still fails the scan.

minimatch 3.1.5 — @ts-morph/common 0.12.3 (ts-prune) and recursive-readdir 2.2.3 (create-wdio). Both require('minimatch') as a CJS function or Minimatch constructor. 11.x CJS is a namespace (typeof require('minimatch') === 'object') and is not callable. Dev-only; patterns are repo-controlled. 3.x does not have firstPhasePreProcess / optimizationLevel >= 2.

minimatch 5.1.9 — mocha 10.8.2 (WDIO), filelist 1.0.6, readdir-glob 1.1.3 (archiver), and mocha's glob 8.1.0. mocha does const minimatch = require('minimatch'); minimatch(filename, pattern, …). That call throws on 11.x. Dev-only WDIO/archive paths on repo-controlled sources. 5.x also lacks the described preprocessor.

Rewriting mocha or ts-prune to the 11.x namespace is out of scope for this unblock.

Check command

/tmp/osv-scanner scan --lockfile=pnpm-lock.yaml --lockfile=Cargo.lock --lockfile=apps/desktop/src-tauri/Cargo.lock --config=osv-scanner.toml
# No issues found (osv-scanner 2.6.0, same as CI)

node scripts/security/dependency-hardening.test.mjs
pnpm --filter @varve/website build    # 127 pages
pnpm --filter @varve/desktop build
pnpm exec vitest run apps/desktop --maxWorkers=2   # 15 files, 91 tests
pnpm test:website                                  # 25 files, 321 tests

pnpm verify:affected selected only touched-file format/lint/audits and then exited because the planner escalates workspace/lockfile edits to the hosted full gate. Those selected lanes passed locally (biome check, audit:emoji, audit:docs, audit:claims).

Checklist

  • My commits are signed off (git commit -s)
  • I could not fix a CI failure (explain above)
Open in Web Open in Cursor 

Override glob 9+ to 14.0.3 and minimatch 9+ to 11.0.3 so the lockfile
scan stops failing on GHSA-3g3m-2fjr-6pw4 and GHSA-g3hv-75wg-m249.
Leave minimatch 3.x/5.x alone: mocha and ts-prune still require() it
as a function. Ignore those leftover versions until 2026-12-30.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>
@K-Arthur
K-Arthur merged commit c67a7cc into master Oct 31, 2026
58 checks passed
@K-Arthur
K-Arthur deleted the cursor/osv-glob-minimatch-921a branch October 31, 2026 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants